Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Set ELECTRON_OZONE_PLATFORM_HINT=auto as the default #1434

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

polkaulfield
Copy link
Contributor

Fixes rendering issues and crashing of electron apps when using the NVIDIA drivers.

This makes the electron applications (flatpak or not) to detect the type of session and act accordingly.

https://www.electronjs.org/docs/latest/api/environment-variables#electron_ozone_platform_hint-linux

Fixes rendering issues and crashing of electron apps when using the NVIDIA drivers. 

This makes the electron applications (flatpak or not) to detect the type of session and act accordingly.

https://www.electronjs.org/docs/latest/api/environment-variables#electron_ozone_platform_hint-linux
@polkaulfield polkaulfield changed the title Set ELECTRON_OZONE_PLATFORM_HINT=auto as the default feat: Set ELECTRON_OZONE_PLATFORM_HINT=auto as the default Jun 24, 2024
Copy link
Member

@castrojo castrojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooh, thanks!

@castrojo castrojo merged commit 60fe173 into ublue-os:main Jun 24, 2024
46 of 58 checks passed
@polkaulfield
Copy link
Contributor Author

From my testing everything gets fixed, the only downside is that with some apps, you get the wayland icon instead of the app one when alt-tabbing. Other than that, tested element, boxy-svg, signal, discord, spotify and most importantly VSCode and all the UI rendering bugs and stuttering go away :)

Maybe if you prefer to use Xwayland it could be merged just for NVIDIA, but i think the Wayland icon is a small downside to the performance improvements.

@castrojo
Copy link
Member

Yeah working apps > icons every time, no worries!

@polkaulfield
Copy link
Contributor Author

polkaulfield commented Jun 24, 2024

I just checked it and it seems that /usr/etc/environment doesnt get sourced if you have changes already in /etc. Is that the expected behavior? I started using silverblue based Linux a few weeks ago.

I used this as a template: https://github.com/ublue-os/bluefin/blob/main/system_files/silverblue/usr/etc/environment

My testing was done applying the env variable on /etc/environment

@p5
Copy link
Member

p5 commented Jun 24, 2024

Yes, unfortunately if somebody has edited their local file, the updates to that same file will not be applied.

We could look to change the configuration to /etc/environment.d/something.conf, which should help. Not too sure if this is a valid drop-in directory yet.

Edit: looks valid - https://www.freedesktop.org/software/systemd/man/latest/environment.d.html

@polkaulfield
Copy link
Contributor Author

Ok! I'll work on it. Seems a way better approach. What about /etc/environment.d/electron-flags.conf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants